Created: 05/30/2012
By: KVendrik
Email: Contact
GFXFree.Net - Download Web Templates
Thank you for purchasing myCode. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here.
First you need to open myCode/Login.php and edit the username and password to something of your choice. After this the only thing you have to do is uploading the myCode folder to your server's root directory. Now go to yourwebsiteurl.com/myCode/ and you can start using myCode right away.
myCode contains JS, CSS and PHP files. Let's start by explaning the Javascript. The only JS code that myCode uses is to save or create files from the createfile/createcontent.php and the editfile.php pages. You can find the JS code in these files. The jQuery file that both of these files use can be found in the JS folder.
The CSS file can be found in the CSS folder and is named style.css. You can use this file to modify the layout of myCode. While editing the menu buttons in the HTML file you will note that the buttons are in a order from right to left. while the extual buttons are from left to right. This is because the CSS code tells this class that it should float: right;. This is just one of the examples that you might run into. If you have any questions about the CSS modification of myCode then just contact me trough my Envato page. I'll be happy to help you out.
AttentionRed
AttentionGreen
The PHP pages contain the code for the processing of commands such as file creation and file editing but they also contain the content of the pages. You can find the layout of the file lists in the index.php and open.php files. Below you can find the php code of these pages with an explaination.
echo "
Files |
---|
$entry\n Open | "; // The code above will get al the files from the current directory. It will also filter the files and display only the directories using the is_dir function. } if (is_file($entry) && $entry != "." && $entry != "..") { echo "|||||||
$entry\n Edit Delete | "; elseif ($filetype=="php") echo "$entry\n Edit Delete | "; elseif ($filetype=="css") echo "$entry\n Edit Delete | "; elseif ($filetype=="js") echo "$entry\n Edit Delete | "; elseif ($filetype=="xml") echo "$entry\n Edit Delete | "; elseif ($filetype=="sql") echo "$entry\n Edit Delete | "; elseif ($filetype=="txt") echo "$entry\n Edit Delete | "; else echo "$entry\n Delete | "; // The code above will check if the file is a directory or not. // If it's a file then it will check the extension. // If it is a HTML, PHP, CSS, JS, XML, SQL or TXT file // it will display a menu to edit or delete the file with the right icon // If the file has another extension then it will display a // custom icon and only show a delete button and not a edit button. // You can easily add file extensions by copying the elseif statement of // a extension and past it below that extension and changing // it to your desired extension. // I added an example below this code explaination. } } // The code below closes the dir so it will not get // into a loop of reading the directory. // If this happens then the page will not stop loading. closedir($handle); } echo "
elseif ($filetype=="txt") echo "$entry\n Edit Delete "; // TXT is the last extension in the list after this the else statement will trigger // If you want to add an extension for example PNG then the code would be elseif ($filetype=="png") echo "$entry\n Edit Delete "; // Note that not only the extension is changed but also the // icon by changing the class to fileother instead of filetxt // Also note that this code should be directly below the // last extension and not after the else statement
The PHP code in the open.php file is almost the same the only diffrence is that it also keeps track of the folder path to make sure that it won't try to open for example a file within a subdirectory from within the root directory. This is done by the $_GET['dir'] . "/" code. This code gets the previous directory given by the index.php file. It also adds a / to it so you get a working path to the file.
The PHP pages that are being used for pure code are the createfile.php and the editfile.php page. Most of the other PHP codes can be found op the viewing pages. The only reason that the code to create and edit files are not in the same file as the viewing page is in is because jQuery requires an external file for the form action in order to work properly. Below you can find the code from the editfile.php and createfile.php pages.
Q: I can't use the upload function, when I upload a file it just doesn't appear in the file list.
A: If something like this happens then you should make sure the target directory has a 777 CHMOD value. If you can't get it fixed on your own then don't hasitate to contact me.
Once again, thank you so much for purchasing myCode. As I said at the beginning, I'd be glad to help you if you have any questions relating to this.
KVendrik